<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<%@ include file="../../common/jsp/sheetHeader.jsp" %>
<link rel="Stylesheet" type="text/css" href="/Mass_template/common/colpick/css/colpick.css" />
<script type="text/javascript" src="/Mass_template/common/colpick/js/colpick.js"></script>
<style>
.picker {
	margin:0;
	padding:0;
	border:0;
	width:60px;
	height:20px;
 	border-right:20px solid #ccc;
	border-left:1px solid #ccc;
	border-top:1px solid #ccc;
	border-bottom:1px solid #ccc;
	line-height:20px;
}
</style>
<script>
	$(document).ready(function() {
		
		//sheet 초기화  
		createIBSheet2(document.getElementById("viewArea"),"mySheet","100%","400px");
		var initData = {};		
		initData.Cfg = {FrozenCol:3,FrozenColRight:1,SearchMode:smLazyLoad,Page:30};
		initData.HeaderMode = {Sort:1,ColMove:1,ColResize:1,HeaderCheck:0};
		initData.Cols = [
				{Header:"No",Type:"Seq",Width:50,SaveName:"sSeq",Align:"Center"},
				{Header:"상태",Type:"Status",Width:50,SaveName:"sStatus",Align:"Center"},
				{Header:"텍스트",Type:"Text",Width:70,SaveName:"sText",Align:"Center",KeyField:1,ColMerge:1,Wrap:1, BackColor:'#FF9E9B'},
				{Header:"주민등록번호",Type:"Text",Width:120,SaveName:"sTextId",Align:"Center",ColMerge:0,Format:"IdNo"},
				{Header:"사업자번호",Type:"Text",Width:110,SaveName:"sTextSaup",Align:"Center",ColMerge:0,Format:"SaupNo"},
				{Header:"카드번호",Type:"Text",Width:140,SaveName:"sTextCard",Align:"Center",ColMerge:0,Format:"CardNo"},
				{Header:"우편번호",Type:"Text",Width:90,SaveName:"sTextPost",Align:"Center",ColMerge:0,Format:"PostNo"},
				{Header:"전화번호",Type:"Text",Width:90,SaveName:"sTextPhone",Align:"Center",ColMerge:0,Format:"PhoneNo"},
				{Header:"주민등록번호",Type:"Text",Width:120,SaveName:"sUserFormat",Align:"Center",ColMerge:0,Format: "######-*******"}
				];

		IBS_InitSheet(mySheet,initData);

		mySheet.FitColWidth();
		
		doAction("search");
	});
	
	/*Sheet 각종 처리*/
	function doAction(sAction) {
		
		switch(sAction) {
			case "search":		//조회
				mySheet.DoSearch("../data/format.json");
				break;
			case "subsum":
			    var info = [{StdCol:0, SumCols:"2|3|4|5", ShowCumulate:0,Sort:0,CaptionCol:0}];
			   	mySheet.ShowSubSum(info); 
			   	doAction('search');
		    break;
		}
	}
	
	
</script>
<title>주민등록번호 예제</title>
</head>
<body>
<div id="main">
	<%@ include file="../../common/jsp/sheetNavi.jsp" %>
	<div id="title">주민등록번호 예제</div>
	<div id="desc">
		주민등록번호 사용 예제
	</div>

	<div id="functionArea">
		<div>컬럼 설정시 셀 값을 확인하여 포맷을 변경할 수 있다.<br>
		주민등록번호를 표시할때는 Format 의 IdNo를 사욜하면 된다. 숫자 13자리일 때 "######-#######"로 표현하며 확인 시 숫자 13자리를 반환한다.<br>
		주민등록번호를 표시할때, 뒷자리를 숨겨야 할 경우 "######-*******" 와 같이 표시를 할 수 있다.
		</div>
		<br>
		<div>var cols = [<br>
		&nbsp;&nbsp;&nbsp;&nbsp;.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;{Type:"Text",Width:120,SaveName:"sTextId",Align:"Center",ColMerge:0,<font color="#FF0000"><u>Format:"IdNo"</u></font>},<br>
		&nbsp;&nbsp;&nbsp;&nbsp;.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;{Type:"Text",Width:120,SaveName:"sUserFormat",Align:"Center",ColMerge:0,<font color="#FF0000"><u>Format:"######-*******"</u></font>},<br>
		&nbsp;&nbsp;&nbsp;&nbsp;.<br>
		&nbsp;&nbsp;&nbsp;&nbsp;.<br>
			];
		</div>
	</div>
	
	<div id="viewArea">
	</div>
</div>
</body>
</html>